[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
VPUTCHRS Introduced: v3.12
. Summary
vputchrs (int <x>, int <y>, str <buf>, int <pos>, int <num>, int <c>);
. Description
The vputchrs function is used to place a string of characters (starting
at <pos> in <buf>) on the screen at column <x> row <y>, specifying
color information at the same time. <c> (optional) is the color to use
for all characters. The proper value of <c> is obtained with the
expression
(c + color * 256)
Possible colors are numbered as follows:
Black 00
Blue 01
Green 02
Cyan 03
Red 04
Magenta 05
Brown 06
Light Grey 07
Dark Grey 08
Light Blue 09
Light Green 10
Light Cyan 11
Light Red 12
Light Magenta 13
Yellow 14
White 15
To obtain a color attribute value for a color combination, the for-
mula is
color attribute value =
foreground color value + (16 * background color value)
Therefore, a Yellow character on a Blue background would have a
color attribute value of 30 (14 + (16 * 1)).
. Return Value
None.
. Example
// copy 20 characters starting from 10,10 on the screen to 20,20
// Don't keep color attributes
str buffer[20];
vgetchrs(10, 10, buffer, 0, 20);
vputchrs(20, 20, buffer, 0, 20);
See Also:
vgetchr
vgetchrs
vgetchrsa
vputchr
vputchrsa
color chart
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson